package tb_item;

import com.taobao.api.ApiException;
import com.taobao.api.DefaultTaobaoClient;
import com.taobao.api.TaobaoClient;
import com.taobao.api.request.TbkItemGetRequest;
import com.taobao.api.response.TbkItemGetResponse;
import mini.ideashare.cms.Main;
import mini.ideashare.cms.dao.TB_ItemDAO;
import mini.ideashare.cms.manager.JobManager;
import mini.ideashare.cms.model.TB_Item;
import mini.ideashare.cms.model.qc.TB_ItemQC;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.util.Date;
import java.util.List;

@RunWith(SpringRunner.class)
@SpringBootTest(classes = Main.class)
public class TB_ItemTEST {

    @Autowired
    private TB_ItemDAO tb_itemDAO;

    @Autowired
    private JobManager jobManager;


    @Test
    public void testGet(){
        List<TB_Item> tb_items = tb_itemDAO.listTB_Item(new TB_ItemQC());
        System.out.println(tb_items);
    }
    @Test
    public void testJob(){
        jobManager.removeExpire();
    }


}
